import React, { Component } from 'react'
import { Result, Button } from 'antd'
import { withRouter } from 'react-router-dom'
import './noMatch.less'

class noMatch extends Component {

  back() {
    this.props.history.push('/home');
  }

  render() {
    const resultProps = {
      '404': {
        title: '404',
        subTitle: 'Sorry, the page you visited does not exist.',
        extra: <Button type="primary" onClick={this.back.bind(this)}>返回首页</Button>,
      },
    }
    return (
      <section className="no-match">
        <Result status={404} {...resultProps['404']} />
      </section>
    )
  }
}
export default withRouter(noMatch)